<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <title>测试1</title>

</head>
<body>
    <button>按钮</button>
    <div class="test" >测试对象</div>
    <div class="test1" >测试对象1</div>
    <div class="test2" >测试对象2</div>

</body>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('button').click(function () {
            $('.test').toggle(1000);
            $('.test1')[0].style.display = 'none';//jq转换为DOM方法1
            $('.test2')[0].style.display = 'none';//jq转换为DOM方法2
        })
    })
</script>


</html>
